<!-- 测评分数页面 -->
<div class="content-area" id="evaluation-score-management">
    <div class="page-header">
        <div class="page-title">测评分数</div>
        <div class="page-description">查询和管理测评分数，包括部门分数和教师分数计算</div>
    </div>

    <div class="tabs-container">
        <div class="tabs">
            <div class="tab active" onclick="EvaluationScoreModule.switchScoreTab('dept-indicators')">
                部门指标分数
            </div>
            <div class="tab" onclick="EvaluationScoreModule.switchScoreTab('dept-total')">部门总分</div>
            <div class="tab" onclick="EvaluationScoreModule.switchScoreTab('teacher-indicators')">教师指标分数
            </div>
            <div class="tab" onclick="EvaluationScoreModule.switchScoreTab('teacher-total')">教师总分</div>
            <div class="tab" onclick="EvaluationScoreModule.switchScoreTab('calculation')">分数计算</div>
        </div>

        <!-- 部门指标分数子页面 -->
        <div class="tab-content active" id="dept-indicators-score-tab">
            <div class="table-container">
                <div class="table-header">
                    <div class="table-title">部门指标分数列表</div>
                    <div class="table-actions">
                        <input class="search-input" id="deptIndicatorScoreSearch" placeholder="搜索部门"
                               type="text">
                        <select class="search-select" id="deptIndicatorTypeSearch">
                            <option value="">全部指标</option>
                        </select>
                        <button class="btn btn-secondary"
                                onclick="EvaluationScoreModule.searchDeptIndicatorScores()">搜索
                        </button>
                        <button class="btn btn-secondary"
                                onclick="EvaluationScoreModule.exportDeptIndicatorScores()">导出
                        </button>
                        <button class="btn btn-secondary"
                                onclick="EvaluationScoreModule.exportDeptPersonnelData()">导出人事数据
                        </button>
                    </div>
                </div>
                <div class="table-content" id="deptIndicatorScoresTableContent">
                    <table class="data-table">
                        <thead>
                        <tr>
                            <th>部门编号</th>
                            <th>部门名称</th>
                            <th>指标编号</th>
                            <th>测评权重编号</th>
                            <th>测评权重名称</th>
                            <th>测评指标权重</th>
                            <th>分数</th>
                            <!--th>操作</th-->
                        </tr>
                        </thead>
                        <tbody>
                        <tr>
                            <td class="loading" colspan="8">加载中...</td>
                        </tr>
                        </tbody>
                    </table>
                    <div class="pagination-container" id="deptIndicatorScoresPagination"></div>
                </div>
            </div>
        </div>

        <!-- 部门总分子页面 -->
        <div class="tab-content" id="dept-total-score-tab">
            <div class="table-container">
                <div class="table-header">
                    <div class="table-title">部门总分列表</div>
                    <div class="table-actions">
                        <input class="search-input" id="deptTotalScoreSearch" placeholder="搜索部门"
                               type="text">
                        <select class="search-select" id="deptScoreRangeSearch">
                            <option value="">全部分数</option>
                            <option value="90-100">90-100分</option>
                            <option value="80-90">80-90分</option>
                            <option value="70-80">70-80分</option>
                            <option value="0-70">70分以下</option>
                        </select>
                        <button class="btn btn-secondary"
                                onclick="EvaluationScoreModule.searchDeptTotalScores()">搜索
                        </button>
                        <button class="btn btn-secondary"
                                onclick="exportDeptTotalScores()">导出
                        </button>
                    </div>
                </div>
                <div class="table-content" id="deptTotalScoresTableContent">
                    <div class="loading">加载中...</div>
                </div>
                <div class="pagination-container" id="deptTotalScoresPagination"></div>
            </div>
        </div>

        <!-- 教师指标分数子页面 -->
        <div class="tab-content" id="teacher-indicators-score-tab">
            <div class="table-container">
                <div class="table-header">
                    <div class="table-title">教师指标分数列表</div>
                    <div class="table-actions">
                        <input class="search-input" id="teacherIndicatorScoreSearch" placeholder="搜索教师"
                               type="text">
                        <select class="search-select" id="teacherIndicatorTypeSearch">
                            <option value="">全部指标</option>
                        </select>
                        <button class="btn btn-secondary"
                                onclick="EvaluationScoreModule.searchTeacherIndicatorScores()">搜索
                        </button>
                        <button class="btn btn-secondary"
                                onclick="EvaluationScoreModule.exportTeacherIndicatorScores()">导出
                        </button>
                        <button class="btn btn-secondary"
                                onclick="EvaluationScoreModule.exportTeacherAdminData()">导出行政数据
                        </button>
                        <button class="btn btn-secondary"
                                onclick="EvaluationScoreModule.exportTeacherTeacherData()">导出教师数据
                        </button>
                    </div>
                </div>
                <div class="table-content" id="teacherIndicatorScoresTableContent">
                    <div class="loading">加载中...</div>
                </div>
                <div class="pagination-container" id="teacherIndicatorScoresPagination"></div>
            </div>
        </div>

        <!-- 教师总分子页面 -->
        <div class="tab-content" id="teacher-total-score-tab">
            <div class="table-container">
                <div class="table-header">
                    <div class="table-title">教师总分列表</div>
                    <div class="table-actions">
                        <input class="search-input" id="teacherTotalScoreSearch" placeholder="搜索教师"
                               type="text">
                        <select class="search-select" id="teacherScoreDeptSearch">
                            <option value="">全部部门</option>
                        </select>
                        <select class="search-select" id="teacherScoreRangeSearch">
                            <option value="">全部分数</option>
                            <option value="90-100">90-100分</option>
                            <option value="80-90">80-90分</option>
                            <option value="70-80">70-80分</option>
                            <option value="0-70">70分以下</option>
                        </select>
                        <button class="btn btn-secondary"
                                onclick="EvaluationScoreModule.searchTeacherTotalScores()">搜索
                        </button>
                        <button class="btn btn-secondary"
                                onclick="EvaluationScoreModule.exportTeacherTotalScores()">导出
                        </button>
                    </div>
                </div>
                <div class="table-content" id="teacherTotalScoresTableContent">
                    <div class="loading">加载中...</div>
                </div>
                <div class="pagination-container" id="teacherTotalScoresPagination"></div>
            </div>
        </div>

        <!-- 分数计算子页面 -->
        <div class="tab-content" id="calculation-tab">
            <div class="calculation-container">
                <h3>分数计算</h3>
                <div class="calculation-options">
                    <div class="option-group">
                        <h4>部门分数计算</h4>
                        <button class="btn btn-primary"
                                onclick="EvaluationScoreModule.calculateDeptIndicatorScores()">
                            计算部门指标分数
                        </button>
                        <button class="btn btn-primary"
                                onclick="EvaluationScoreModule.calculateDeptTotalScores()">计算部门总分
                        </button>
                        <button class="btn btn-danger" onclick="EvaluationScoreModule.resetDeptScores()">
                            重置部门分数
                        </button>
                    </div>
                    <div class="option-group">
                        <h4>教师分数计算</h4>
                        <button class="btn btn-primary"
                                onclick="EvaluationScoreModule.calculateTeacherIndicatorScores()">
                            计算教师指标分数
                        </button>
                        <button class="btn btn-primary"
                                onclick="EvaluationScoreModule.calculateTeacherTotalScores()">计算教师总分
                        </button>
                        <button class="btn btn-danger" onclick="EvaluationScoreModule.resetTeacherScores()">
                            重置教师分数
                        </button>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <!-- 部门指标分数详情模态框 -->
    <div class="modal" id="deptIndicatorScoreDetailModal">
        <div class="modal-content" style="max-width: 900px;">
            <div class="modal-header">
                <h3>部门指标分数详情</h3>
                <span class="close" onclick="EvaluationScoreModule.closeDeptIndicatorScoreDetailModal()">&times;</span>
            </div>
            <div class="modal-body">
                <div class="dept-info-section">
                    <h4>基本信息</h4>
                    <div class="info-grid">
                        <div class="info-item">
                            <label>部门编号：</label>
                            <span id="detailIndicatorDeptCode"></span>
                        </div>
                        <div class="info-item">
                            <label>部门名称：</label>
                            <span id="detailIndicatorDeptName"></span>
                        </div>
                        <div class="info-item">
                            <label>指标编号：</label>
                            <span id="detailIndicatorCode"></span>
                        </div>
                        <div class="info-item">
                            <label>指标名称：</label>
                            <span id="detailIndicatorName"></span>
                        </div>
                        <div class="info-item">
                            <label>指标权重：</label>
                            <span id="detailIndicatorWeight"></span>
                        </div>
                        <div class="info-item">
                            <label>测评权重编号：</label>
                            <span id="detailIndicatorWeightCode"></span>
                        </div>
                        <div class="info-item">
                            <label>最终得分：</label>
                            <span id="detailIndicatorScore"></span>
                        </div>
                    </div>
                </div>
                
                <div class="evaluation-details-section">
                    <h4>测评明细</h4>
                    <div class="table-content">
                        <table class="data-table">
                            <thead>
                                <tr>
                                    <th>测评人编号</th>
                                    <th>测评人姓名</th>
                                    <th>测评分数</th>
                                    <th>测评日期</th>
                                </tr>
                            </thead>
                            <tbody id="deptIndicatorScoreDetailTableBody">
                                <tr>
                                    <td colspan="4" class="loading">加载中...</td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
            <div class="modal-footer">
                <button class="btn btn-secondary" onclick="EvaluationScoreModule.closeDeptIndicatorScoreDetailModal()">关闭</button>
                <button class="btn btn-primary" onclick="EvaluationScoreModule.exportDeptIndicatorScoreDetail()">导出详情</button>
            </div>
        </div>
    </div>

    <!-- 部门总分详情模态框 -->
    <div class="modal" id="deptScoreDetailModal">
        <div class="modal-content" style="max-width: 900px;">
            <div class="modal-header">
                <h3>部门指标分数详情</h3>
                <span class="close" onclick="EvaluationScoreModule.closeDeptScoreDetailModal()">&times;</span>
            </div>
            <div class="modal-body">
                <div class="dept-info-section">
                    <h4>部门信息</h4>
                    <div class="info-grid">
                        <div class="info-item">
                            <label>部门编号：</label>
                            <span id="detailDeptCode"></span>
                        </div>
                        <div class="info-item">
                            <label>部门名称：</label>
                            <span id="detailDeptName"></span>
                        </div>
                        <div class="info-item">
                            <label>总分：</label>
                            <span id="detailTotalScore"></span>
                        </div>
                        <div class="info-item">
                            <label>排名：</label>
                            <span id="detailRanking"></span>
                        </div>
                    </div>
                </div>
                
                <div class="indicators-section">
                    <h4>指标分数明细</h4>
                    <div class="table-content">
                        <table class="data-table">
                            <thead>
                                <tr>
                                    <th>指标编号</th>
                                    <th>指标名称</th>
                                    <th>考核点编号</th>
                                    <th>考核点名称</th>
                                    <th>得分</th>
                                    <th>满分</th>
                                    <th>得分率</th>
                                    <th>测评日期</th>
                                </tr>
                            </thead>
                            <tbody id="deptScoreDetailTableBody">
                                <tr>
                                    <td colspan="8" class="loading">加载中...</td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
            <div class="modal-footer">
                <button class="btn btn-secondary" onclick="EvaluationScoreModule.closeDeptScoreDetailModal()">关闭</button>
                <button class="btn btn-primary" onclick="EvaluationScoreModule.exportDeptScoreDetail()">导出详情</button>
            </div>
        </div>
    </div>
</div> 